package shuati.chuanzhibei.juesai;

import java.io.*;
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

/**
 * @Date : 2023-04-09
 * @Description:
 */
public class FFFFFFFFF {
    static BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
    static BufferedWriter bw=new BufferedWriter(new OutputStreamWriter(System.out));
    static Scanner scanner = new Scanner(System.in);
    static int l,lmax,n,m;
    static String Sr;
    public static void main(String[] args) throws IOException {
        String[] split = br.readLine().split("\\s+");
        l=Integer.parseInt(split[0]);
        lmax=Integer.parseInt(split[1]);
        n=Integer.parseInt(split[2]);
        m=Integer.parseInt(split[3]);
       // String Sr = br.readLine();


        StringBuffer   start=new StringBuffer(br.readLine());


        for (int i = lmax; i >1; i--) {
            if(l%i==0){
                int a=ffffffff(start,i);
                if(a<=m) System.out.println();
            }
        }
    }
    public  static  int ffffffff(StringBuffer str,int i){
//        String[] split = new String(str).split("(.{i})");
        String s = new String(str);
        List list = stringToList(s, i);
return 1;
    }

    public static List stringToList(String str,int length){
        List list = new ArrayList();
        //按照该长度进行字符串的分割
        //将输入的字符串分割为几份
        int size = str.length()/length+1;
        System.out.println(size);
        for (int i = 0; i < size; i++) {
            if (i==size-1){
                String substring = str.substring(i * length, str.length());
                list.add(substring);
            }else {
                String substring = str.substring(i * length, (i + 1) * length);
                list.add(substring);
            }
        }
        return list;
    }
}
